import 'package:flutter/material.dart';
import 'package:xm_app/common/ui/AppTheme.dart';
import 'package:xm_app/common/ui/ui_adapter.dart';

class CommonListTitle extends StatelessWidget {
  final String title;
  final IconData iconData;
  const CommonListTitle({Key key, this.title, this.iconData}) : super(key: key);
  @override
  Widget build(BuildContext context) {
    return Container(
      height: getHeight(50),
      child: Row(
        children: [
          // SizedBox(width: getWidth(5)),
          if (iconData != null) Icon(iconData),
          SizedBox(width: getWidth(5)),
          Text(
            title,
            style: TextStyle(fontSize: getSp(18), fontWeight: FontWeight.w700),
          ),
          SizedBox(width: getWidth(15)),
          Spacer(),
          Row(
            children: [
              Text("更多", style: TextStyle(fontSize: getSp(12), color: AppTheme.pinkColor)),
              Icon(
                Icons.arrow_forward_ios,
                color: AppTheme.pinkColor,
                size: getSp(15),
              ),
            ],
          ),
          SizedBox(width: getWidth(10)),
        ],
      ),
    );
  }
}
